package com.crm.service.Impl;

import com.crm.mapper.contactMapper;
import com.crm.pojo.Contact;
import com.crm.pojo.client;
import com.crm.service.contactService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class contactServiceImpl implements contactService {
    @Autowired
    private contactMapper mapper;
    @Override
    public List<Contact> selectAll(int uid) {
        return mapper.selectAll(uid);
    }

    @Override
    public boolean save(Contact contact) {
        return mapper.save(contact);
    }

    @Override
    public boolean updateById(Contact contact) {
        return mapper.updateById(contact);
    }

    @Override
    public boolean deleteById(int id) {
        return mapper.deleteById(id);
    }

    @Override
    public client selectByCid(int cid) {
        return mapper.selectByCid(cid);
    }

    @Override
    public List<Contact> selectByKey(int uid, String key) {
        return mapper.selectByKey(uid,key);
    }
}
